<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
            a{
               text-decoration: none;
               font-size: 20px;
               color: blue;
           }
           body{
               background-image: url(fhh.jpg);
           }
           </style>
</head>
<body>
    <input id="k" type="text" value="name">
    <input id="v" type="text" value="jack">
    <input id="btn" type="button" value="test">
    <script>
    var k=document.getElementById('k');
    var v=document.getElementById('v');
    var btn=document.getElementById('btn');
    var o={};
    btn.onclick=function(){
        o[k.value]=v.value;
        console.log(o);
    };
    </script>
     <p><a href="第五章作业.html">返回</a> </p>
</body>
</html>